package com.xmy.cultivate.entity;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.HashMap;
import java.util.List;

/**
 * <p>
 * 补课表
 * </p>
 *
 * @author Coly
 * @since 2023-03-07
 */
@Getter
@Setter
@Accessors(chain = true)
@TableName("repair_course")
public class RepairCourse implements Serializable {

    private static final long serialVersionUID = 1L;

    //@TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 插/调/消入班级的排课id
     */
    private Long schedulingDetailId;


    /**
     * 被调的排课id
     */
    private Long outSchedulingDetailId;

    /**
     * 消课时的订单id
     */
    private Long orderDetailId;

    /**
     * 班级id
     */
    private Long gradeId;

    /**
     * 班级名称
     */
    private String gradeName;

    private Long oldGradeId;


    private Long oldTeacherId;

    /**
     * 上课日期
     */
    private LocalDate schoolDate;

    private String timeStart;

    private String timeEnd;

    /**
     * 上课开始时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime startDateTime;

    /**
     * 上课结束时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime endDateTime;

    /**
     * 课程记录id
     */
    private Long recordCourseId;

    /**
     * 学生id
     */

    private  Long studentId;

    /**
     * 老师id
     */
    private Long teacherId;

    /**
     * 老师名称
     */
    private String teacherName;

    /**
     * 教室id
     */
    private Long roomId;

    /**
     * 教室名称
     */
    private String roomName;

    private Integer lessonType;

    /**
     * 课次
     */
    private Integer lessonNum;

    /**
     * 科目id
     */
    private Long subjectsId;

    /**
     * 科目名称
     */
    private String subjectsName;

    /**
     * 1精品课（正常排课），3补课，4调课，5消课,6缺课补课,7
     */
    private Integer courseType;

    /**
     * 1插班补课，2日程补课
     */
    private Integer repairType;

    private Integer yearPart;

    private Integer quarter;

    private Long schoolId;

    /**
     * 0未上（补/消/调课），1已上（补/消/调课）
     */
    private Integer status;

    private Integer useLeaveNum;

    /**
     * 精品课所在年级（后面添加的字段）
     */
    private Integer yearClassId;

    private Integer isSignIn;

    /**
     * 0正常，1删除
     */
    @TableLogic
    private Integer deleted;

    @TableField(fill = FieldFill.INSERT)
    private Long createdId;

    @TableField(fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createdAt;

    private LocalDateTime updatedAt;

    private LocalDateTime deletedAt;

    @TableField(exist = false)
    private List<Long> studentIdList;

    /**
     * 1班级（排课、调课），2个人（调课、补课，消课）
     */
    @TableField(exist = false)
    private Integer schedulingType;

    /**
     * 转出班级id(记录转校时自动创建班级是否已经创建)
     */
    private Long outId;

    /**
     * 转出校区详情id
     */
    private Long changeSchoolDetailId;

    @TableField(exist = false)
    private String studentName;

    @TableField(exist = false)
    private String courseName;

    @TableField(exist = false)
    private String schoolName;

    /**
     * 上课时间
     */
    @TableField(exist = false)
    private List<RepairCourse> schoolTimeList;
}
